<template>
    <div>
        <my-h2></my-h2>
        <button @click='fa'>a</button>
        <button @click='fb'>b</button>
        <aaa v-if='show'></aaa>
        <bbb v-else></bbb>
        <h1>------------{{name123}}</h1>
        <!-- <keep-alive :include="/^b/">
            <component :is="comId"></component>
        </keep-alive> -->
        
    </div>
</template>
<script>
// @ is an alias to /src
// import aaa from './a'
// import bbb from './b'
export default {
    name: 'XXX',
    data() {
        return {
            name123:'哈哈',
            name:'111',
            show:true,
            // comId:aaa
        }
    },
    methods: {
        fa(){
            this.show = true;
            // this.comId = aaa
            this.mypluginfn()
        },
        fb(){
            this.show = false;
            // this.comId = bbb
        }
    },
    components: {
        aaa:()=>import('./a'),
        bbb:()=>import('./b')
    }
}
</script>
<style lang="less">

</style>